const mongoose = require('mongoose');
//创建管理员列表集合的约束对象
const adminSchema = mongoose.Schema({
    adminName: {
        type: String,
        required: true,
        unique: true
    },
    password: {
        type: String,
        required: true
    },
    regTime: {
        type: String,
        required: true
    },
    loginTime: {
        type: String,
        require: true,
        default: "----"
    }
})

//根据这个约束对象创建一个管理员列表的集合
const adminModel=mongoose.model('adminList',adminSchema);
module.exports=adminModel;